<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">



  
  
    
      
    
    
      
    
  <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
  <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
    
  
  <link href="//cdn.jsdelivr.net/fancybox/2.1.5/jquery.fancybox.min.css" rel="stylesheet" type="text/css">







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="智能车比赛,NXP,">





  <link rel="alternate" href="/blog/atom.xml" title="二货严の博客" type="application/atom+xml">






<meta name="description" content="14届智能车省赛已经结束了，最后的成绩是信标组第七名，获得省级一等奖。虽然没有获得晋级国赛的机会，但我们组每个人对于这个成绩都已经很满意了。毕竟是一个月前刚开始做，而且算是安大第一次做（虽然之前有过一次，但什么都没留下）。留下了一份可以传递下去的信标组方案，我们的任务也算是完成了。最后在写下这份总结报告，一方面是对今年的总结，另一方面是对后来人提供一些经验，算是抛砖引玉的作用吧。">
<meta name="keywords" content="智能车比赛,NXP">
<meta property="og:type" content="article">
<meta property="og:title" content="智能车总结">
<meta property="og:url" content="https://erhuoyan.gitee.io/blog/blog/d719/index.html">
<meta property="og:site_name" content="二货严の博客">
<meta property="og:description" content="14届智能车省赛已经结束了，最后的成绩是信标组第七名，获得省级一等奖。虽然没有获得晋级国赛的机会，但我们组每个人对于这个成绩都已经很满意了。毕竟是一个月前刚开始做，而且算是安大第一次做（虽然之前有过一次，但什么都没留下）。留下了一份可以传递下去的信标组方案，我们的任务也算是完成了。最后在写下这份总结报告，一方面是对今年的总结，另一方面是对后来人提供一些经验，算是抛砖引玉的作用吧。">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d403e5e1f79b81163.png">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d40400e444ec95999.png">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d4040647012495642.png">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d404518ebf2c94997.png">
<meta property="og:image" content="https://i.loli.net/2019/07/31/5d411c454c85931900.jpg">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d404a523fcfa28904.gif">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d40565fd314346525.png">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d40566845d2e58602.png">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d40566e246f615773.png">
<meta property="og:image" content="https://i.loli.net/2019/07/30/5d40567192ae870190.png">
<meta property="og:updated_time" content="2019-07-31T07:45:55.915Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="智能车总结">
<meta name="twitter:description" content="14届智能车省赛已经结束了，最后的成绩是信标组第七名，获得省级一等奖。虽然没有获得晋级国赛的机会，但我们组每个人对于这个成绩都已经很满意了。毕竟是一个月前刚开始做，而且算是安大第一次做（虽然之前有过一次，但什么都没留下）。留下了一份可以传递下去的信标组方案，我们的任务也算是完成了。最后在写下这份总结报告，一方面是对今年的总结，另一方面是对后来人提供一些经验，算是抛砖引玉的作用吧。">
<meta name="twitter:image" content="https://i.loli.net/2019/07/30/5d403e5e1f79b81163.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://erhuoyan.gitee.io/blog/blog/d719/">


 
   <script> 
   (function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/0f81ff2f.js","daovoice") 
   daovoice('init', { 
      app_id: "7da5cee4" 
      }); 
   daovoice('update'); 
   </script> 


<script>
    (function(){
        if(''){
            if (prompt('请输入文章密码') !== ''){
                alert('密码错误！请询问博主大人！');
                history.back();
            }
        }
    })();
</script>




  <title>智能车总结 | 二货严の博客</title>
  








</head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <a href="https://github.com/erhuoyan" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>

    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">二货严の博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">此后吾之剑与汝同在，汝之命运与吾共存。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br>
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://erhuoyan.gitee.io/blog/blog/blog/d719/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="耿严">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/backgroung.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="二货严の博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">智能车总结</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建时间" itemprop="dateCreated datePublished" datetime="2019-07-30T19:22:50+08:00">
                2019-07-30
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/NXP智能车比赛/" itemprop="url" rel="index">
                    <span itemprop="name">NXP智能车比赛</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          
             <span id="/blog/blog/d719/" class="leancloud_visitors" data-flag-title="智能车总结">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">Visitors&#58;</span>
               
                 <span class="leancloud-visitors-count"></span>
             <span>℃</span>
	     </span>
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv">本文总阅读量
            <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>次
            </span>
          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">Words count in article&#58;</span>
                
                <span title="Words count in article">
                  2.2k 字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">Reading time &asymp;</span>
                
                <span title="Reading time">
                  7 分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <div class="note "><p>14届智能车省赛已经结束了，最后的成绩是信标组第七名，获得省级一等奖。虽然没有获得晋级国赛的机会，但我们组每个人对于这个成绩都已经很满意了。毕竟是一个月前刚开始做，而且算是安大第一次做（虽然之前有过一次，但什么都没留下）。留下了一份可以传递下去的信标组方案，我们的任务也算是完成了。最后在写下这份总结报告，一方面是对今年的总结，另一方面是对后来人提供一些经验，算是抛砖引玉的作用吧。</p></div>
<a id="more"></a>
<h2 id="软件"><a href="#软件" class="headerlink" title="软件"></a>软件</h2><p>我在组里的工作是软件部分，对于我的工作我自认为做的还不错，但在之前调试四轮的时候还是走了很多弯路，既然是最终总结，我觉得之前的经验还是要说一下。</p>
<p>因为学校前人的代码都是用的LPLD的底层库，在使用K60的时候已经算是够用了，但要做到与时俱进的话，建议去尝试一下新的东西。在所有智能车比赛的队伍里我估计有一大半使用的都是山外的K60底层库搭配144脚K60。而我们还在使用100引脚的k60。其实这点我之前已经吐槽过了，但我觉得不会有人会做这种吃力不一定讨好的工作，包括我们组也是这样。</p>
<p>我建议三人小组中有两人做代码工作，一人做硬件工作。两人软件前期可以分工进行，一人负责分配引脚及各项初始化的编写，另一人研究算法。这里我们组之前没有那么明确的分工，虽然我是在寒假期间就把引脚部分配好了，但初始化程序的编写却没跟上进度，而在开始做新标一切重新开始的时候，情况就不一样了。我分析原因应该是由于之前没有接触过K60的编程，甚至拿到一份程序不知道从何看起。而在做新标的时候，已经知道有了K60编程基础，拿到例程也知道怎么去看，甚至是必须要用K66，使用另一个底层库，也知道从哪里下手。</p>
<p><img src="https://i.loli.net/2019/07/30/5d403e5e1f79b81163.png" alt="主函数"></p>
<p>拿到一份程序，就算是学长留下的代码，第一件事就是去找主函数。从第一句话向下看。一般第一两句话就是初始化程序。跳进初始化函数，一条一条地看。这样研究完一份初始化程序，大概也就明白了引脚的分配和控制方案。</p>
<p><img src="https://i.loli.net/2019/07/30/5d40400e444ec95999.png" alt="初始化函数"></p>
<p>然后去研究后面的东西，一般看一下函数名就知道这个函数是干什么用的。最后不要忘记还有中断处理函数。如果是直接使用前人的程序的话，初始化部分直接复制粘贴，最后更改一些引脚就完成了。如果是使用例程，只需要找到一个个相应的例程，将初始化部分复制过来，更改引脚也就结束了。前期引脚分配一定要快和准，因为硬件也只有引脚分配结束才能开始工作。</p>
<p>算法部分也是要花时间研究的，因为不只有PID需要调试，算法本身就有许多参数在不同环境下需要不同的值。就拿信标来说，用摄像头判断车距离信标的远近是通过统计一幅图像的白点数目来体现的，白点数目越多，车离信标灯就越近。之前在理工楼由于环境光线弱，这里算法的参数给的比较大，而比赛场地的环境光线很强，这些参数就要减小，这也是在第一次对抗的时候刚意识到，好在临时写的几个参数还能用。</p>
<p><img src="https://i.loli.net/2019/07/30/5d4040647012495642.png" alt="total_count"></p>
<p>信标组今年之后也算是有了一份祖传代码。对于这套代码我不可能每个细节都说一遍，而且，之前没想过会走到对抗这一步，连发车的程序都没写。导致赛场上一直是手动发车。场面一度尴尬。。。。。</p>
<p>但是有了这套代码，一定要快速知道怎么使用，而不是纠结于如何看懂。我的经验就是用上面的步骤，先找主函数，再看初始化，然后看中断，最后研究算法。相比较而言有些地方还需要改进，改进后还需要测试，由于今年时间有限，最终没有测试出阳光处理的效果，而在比赛过程中也学到了其他学校的一些好的方案。</p>
<h2 id="硬件"><a href="#硬件" class="headerlink" title="硬件"></a>硬件</h2><p>通过比赛这几天我收获最多的不是关于软件的部分，因为比赛不可能还允许我们相互观摩对方的程序。但是通过观察他们的车模，发现大部分使用了两部摄像头，有些是直角放置有些是180度放置，相对而言我们一个摄像头在寻灯方面处于劣势。</p>
<h3 id="openmv"><a href="#openmv" class="headerlink" title="openmv"></a>openmv</h3><p>最让我印象深刻的是安徽财经大学使用的openmv摄像头，因为这个摄像头也是今年第一次允许使用的东西，只有他们这一组使用，从结果看出效果非常好，阳光对他们也没有影响。他们有勇气做第一个吃螃蟹的人，不仅要承认他们的能力，也要承认他们的勇气。</p>
<p>后来我也查了一下这个<a href="https://singtown.com/openmv/" target="_blank" rel="noopener">openmv</a>。被称为具有机器视觉功能的arduino。用过arduino的人都知道，这个东西好用，好用是由于有很多很多的库可以直接使用，不需要再花时间去写一大串代码操作一个个寄存器。在51单片机中要一个引脚输出PWM波要写一连串代码，还不一定准确，在arduino里可能只是一句话的事。其实和我们使用K60底层库一样，为什么要使用库，还不是因为不需要再研究底层寄存器的操作过程了吗。</p>
<p>这是openmv的相关参数</p>
<p><img src="https://i.loli.net/2019/07/30/5d404518ebf2c94997.png" alt="openmv参数"></p>
<p>发现，这根本就是一个处理器，用的还是STM芯片官方怎么给用的？后来去卓晴公众号看，使我搞错了，真正给用的是这个摄像头。</p>
<p><img src="https://i.loli.net/2019/07/31/5d411c454c85931900.jpg" alt="openmvrt"></p>
<p>此模块高度兼容openmv，说白了就是主控换成NXP的了，同样内置python解释器，也就是说用python编程。公众号给的教程资源也是Openmv的官方教程。但比赛结束我就打算弄一块来玩一下了，说不定大创也要用到它。</p>
<div class="note wrong"><p>注意：虽openmvrt跟openmv通用，但是比赛规定只能用NXP公司的主控芯片，所以比赛只能使用openmvrt。根据公众号下方的评论，openmv高度集成了边缘检测、直线提取、曲线识别、色块提取等功能。据卓晴所说，这些只是猜测，竞赛中这些内置算法可能不实用。虽然今年每个组别都可以使用这款摄像头，但以后届次可能会变化。</p></div>
<p>官网的视频有这么一段…….</p>
<p><img src="https://i.loli.net/2019/07/30/5d404a523fcfa28904.gif" alt="调阈值"></p>
<p>怪不得他们那组5分钟调试时间全用在调试摄像头上。我觉得不仅是信标，估计四轮他们使用这个摄像头，也能处理下阳光问题。</p>
<h3 id="立创EDA"><a href="#立创EDA" class="headerlink" title="立创EDA"></a>立创EDA</h3><p>虽然我是负责软件部分，但因为电子工艺实训还是需要会画电路板，ad这个东西还是要学学的。但是我发现ad这个入门太难了。机缘巧合下，我找到这款<a href="https://lceda.cn/" target="_blank" rel="noopener">立创eda</a>，<a href="https://pan.baidu.com/s/1grMVIC3ONQCEK-DIt3TXKg#list/path=%2" target="_blank" rel="noopener">官方教程</a>只有两个多小时。虽然功能不如ad强大，但麻雀虽小五脏俱全。关键是入门简单，而且智能车比赛完全够用。之前有很多组校赛都没参加，就是因为硬件做不出来。对于初学者，我建议还是使用这个软件。至少先快速搭车，后面可以慢慢再研究AD，而且学会了这个，也能帮助下理解AD的很多功能，下面展示下我用立创eda制作的pcb：</p>
<table>
<thead>
<tr>
<th><img src="https://i.loli.net/2019/07/30/5d40565fd314346525.png" alt=""></th>
<th><img src="https://i.loli.net/2019/07/30/5d40566845d2e58602.png" alt=""></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https://i.loli.net/2019/07/30/5d40566e246f615773.png" alt=""></td>
<td><img src="https://i.loli.net/2019/07/30/5d40567192ae870190.png" alt=""></td>
</tr>
</tbody>
</table>
<p>反正这个软件是多么简单，谁用谁知道！</p>
<p>最后附上今年16进8预决赛视频，对手是安徽三联学院。</p>
<ul>
<li><a href="https://b23.tv/av61554325" target="_blank" rel="noopener">预决赛视频</a></li>
</ul>

      
    </div>
    
    
    

<div>
  
    <div>  <div style="text-align:center;color: #555;font-size:14px;">-------------The End-------------</div>  </div>

  
</div>

<div>
      
         <div class="my_post_copyright"> <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script> <!-- JS库 sweetalert 可修改路径 --> <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <p><span>本文标题:</span><a href="/blog/blog/d719/">智能车总结</a></p> <p><span>文章作者:</span><a href="/" title="访问 耿严 的个人博客">耿严</a></p> <p><span>发布时间:</span>2019年07月30日 - 19:07</p> <p><span>最后更新:</span>2019年07月31日 - 15:07</p> <p><span>原始链接:</span><a href="/blog/blog/d719/" title="智能车总结">https://erhuoyan.gitee.io/blog/blog/d719/</a> <span class="copy-path" title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://erhuoyan.gitee.io/blog/blog/d719/" aria-label="复制成功！"></i></span> </p> <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p> </div> <script> var clipboard = new Clipboard('.fa-clipboard'); $(".fa-clipboard").click(function(){ clipboard.on('success', function(){ swal({ title: "", text: '复制成功', icon: "success", showConfirmButton: true }); }); }); </script> 

      
</div>

    
      <div>
        <div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center">
    <img id="wechat_subscriber_qcode" src="/uploads/qrcode_for_gh_cf4b7b7f445a_430.jpg" alt="耿严 wechat" style="width: 200px; max-width: 100%;">
    <div>欢迎您扫一扫上面的微信公众号，订阅我的博客</div>
</div>

      </div>
    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechatpay.jpg" alt="耿严 微信支付">
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/alipay.jpg" alt="耿严 支付宝">
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/智能车比赛/" rel="tag"><i class="fa fa-tag"></i> 智能车比赛</a>
          
            <a href="/blog/tags/NXP/" rel="tag"><i class="fa fa-tag"></i> NXP</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        
          <div class="wp_rating">
            <div id="wpac-rating"></div>
          </div>
        

        

        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/blog/8804/" rel="next" title="无显示器体验树莓派">
                <i class="fa fa-chevron-left"></i> 无显示器体验树莓派
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
        <!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_inline_share_toolbox">
  <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5bfe60f3b5b5d5ce" async="async"></script>
</div>

      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
      <div id="lv-container" data-id="city" data-uid="MTAyMC80MTMzMi8xNzg3OQ=="></div>
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/blog/images/backgroung.jpg" alt="耿严">
            
              <p class="site-author-name" itemprop="name">耿严</p>
              <p class="site-description motion-element" itemprop="description">已有之事后必再有，已行之事后必再行。</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">17</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">25</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/blog/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/erhuoyan" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://blog.csdn.net/qq_33520219" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-rotate-right"></i>CSDN</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://gitee.com/erhuoyan" target="_blank" title="gitee">
                      
                        <i class="fa fa-fw fa-copyright"></i>gitee</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/u/6018509665/home?leftnav=1" target="_blank" title="微博">
                      
                        <i class="fa fa-fw fa-weibo"></i>微博</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://i.loli.net/2018/12/11/5c0f3d8415cba.png" target="_blank" title="QQ">
                      
                        <i class="fa fa-fw fa-qq"></i>QQ</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://i.loli.net/2018/12/11/5c0f3c7adebe1.png" target="_blank" title="微信">
                      
                        <i class="fa fa-fw fa-weixin"></i>微信</a>
                  </span>
                
            </div>
          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-inline">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                Links
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.yilan.io" title="一览" target="_blank">一览</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.eksecorp.com/" title="忆苦思甜(翻译国外文章)" target="_blank">忆苦思甜(翻译国外文章)</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.ruanyifeng.com/" title="阮一峰blog" target="_blank">阮一峰blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.ireadweek.com" title="周读" target="_blank">周读</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.shuwu.mobi" title="我的小书屋" target="_blank">我的小书屋</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.bilibili.com/" title="B站" target="_blank">B站</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://juejin.im/" title="掘金" target="_blank">掘金</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://maxiang.io" title="马克飞象" target="_blank">马克飞象</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://bookist.cc/" title="书大师" target="_blank">书大师</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://sm.ms/" title="SM.MS(图床)" target="_blank">SM.MS(图床)</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.jianshu.com/u/4312c933b9db" title="极客江南(web)" target="_blank">极客江南(web)</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#软件"><span class="nav-number">1.</span> <span class="nav-text">软件</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#硬件"><span class="nav-number">2.</span> <span class="nav-text">硬件</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#openmv"><span class="nav-number">2.1.</span> <span class="nav-text">openmv</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#立创EDA"><span class="nav-number">2.2.</span> <span class="nav-text">立创EDA</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

<div id="music163player">
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=285100&auto=1&height=66"></iframe>
  </div>


      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 &mdash; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-snowflake-o"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">耿严</span>

  
</div>

<!--

  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>




  <span class="post-meta-divider">|</span>

-->


  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div>






  <span class="post-meta-divider">|</span>



<div class="theme-info">
  <div class="powered-by"></div>
  <span class="post-count">博客全站共18.5k字</span>
</div>


        
<div class="busuanzi-count">
  <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      本站访客数
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人次
    </span>
  

  
    <span class="site-pv">
      本站总访问量
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/fastclick/1.0.6/fastclick.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazyload/1.9.3/jquery.lazyload.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.ui.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/fancybox/2.1.5/jquery.fancybox.pack.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  
    <script type="text/javascript">
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  












  





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>AV.initialize("GRTjOhQCLhVF3AMYXzAz9Y9v-gzGzoHsz", "NyiBhoCVvKPkazVBtlL0kKq1");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  
  
  <script type="text/javascript">
  wpac_init = window.wpac_init || [];
  wpac_init.push({widget: 'Rating', id: 15247,
    el: 'wpac-rating',
    color: 'fc6423'
  });
  (function() {
    if ('WIDGETPACK_LOADED' in window) return;
    WIDGETPACK_LOADED = true;
    var mc = document.createElement('script');
    mc.type = 'text/javascript';
    mc.async = true;
    mc.src = '//embed.widgetpack.com/widget.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(mc, s.nextSibling);
  })();
  </script>


  

  

  

   
      <canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;"></canvas> 
      <script type="text/javascript" src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script> 
      <!--<script type="text/javascript" src="/js/src/fireworks.js"></script>-->
      <!-- 页面点击小红心 -->
      <script type="text/javascript" src="/js/src/love.js"></script>

<script src="/blog/live2dw/lib/L2Dwidget.min.js?0c58a1486de42ac6cc1c59c7d98ae887"></script><script>L2Dwidget.init({"model":{"jsonPath":"/blog/live2dw/assets/wanko.model.json"},"display":{"position":"right","width":100,"height":200},"mobile":{"show":true},"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
